<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs for page shortFunctions.php</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />
</head>
<body>
	<div class="page-body">
		<h2 class="file-name">/shortFunctions.php</h2>

		<a name="sec-description"></a>
		<div class="info-box">
			<div class="info-box-title">Description</div>
			<div class="nav-bar">
				<span class="disabled">Description</span> | <a href="#sec-functions">Functions</a>
			</div>
			<div class="info-box-body">
				<!-- ========== Info from phpDoc block ========= -->
				<p class="short-description">File with shortened functions</p>
				<p class="description">
					<p>This file contains functions that are use most so they can
						be called in a much easier fashion</p>
					<p>PHP version 5</p>
				</p>
				<ul class="tags">
					<li><span class="field">author:</span> Marlin Cremers &lt;<a
						href="mailto:marlinc@mms-projects.net">marlinc@mms-projects.net</a>&gt;</li>
					<li><span class="field">link:</span> <a
						href="https://github.com/Marlinc/IRCBot">https://github.com/Marlinc/IRCBot</a></li>
					<li><span class="field">license:</span> <a
						href="http://www.freebsd.org/copyright/freebsd-license.html">BSD
							License (2 Clause)</a></li>
				</ul>

			</div>
		</div>





		<a name="sec-functions"></a>
		<div class="info-box">
			<div class="info-box-title">Functions</div>
			<div class="nav-bar">
				<a href="#sec-description">Description</a> | <span class="disabled">Functions</span>
			</div>
			<div class="info-box-body">
				<a name="functionaddEventCallback" id="functionaddEventCallback">
					<!-- -->
				</a>
				<div class="oddrow">

					<div>
						<span class="method-title">addEventCallback</span> (line <span
							class="line-number">152</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Registers a callback with a event</p>

					<div class="method-signature">
						<span class="method-result">void</span> <span class="method-name">
							addEventCallback </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$eventName</span>, <span class="var-type">callback</span>&nbsp;<span
							class="var-name">$callback</span>)
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$eventName</span><span class="var-description">:
								The event to register to</span></li>
						<li><span class="var-type">callback</span> <span
							class="var-name">$callback</span><span class="var-description">:
								The callback that needs to be called if the event raises</span></li>
					</ul>


				</div>
				<a name="functionbotId" id="functionbotId">
					<!-- -->
				</a>
				<div class="evenrow">

					<div>
						<span class="method-title">botId</span> (line <span
							class="line-number">55</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Returns the bot id that handles
						the current event</p>
					<ul class="tags">
						<li><span class="field">return:</span> The current bot id</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">int</span> <span class="method-name">
							botId </span> ()
					</div>



				</div>
				<a name="functionchan" id="functionchan">
					<!-- -->
				</a>
				<div class="oddrow">

					<div>
						<span class="method-title">chan</span> (line <span
							class="line-number">37</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Returns the current channel name</p>
					<ul class="tags">
						<li><span class="field">return:</span> Returns the channel
							name</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">string</span> <span
							class="method-name"> chan </span> ()
					</div>



				</div>
				<a name="functiongetBotById" id="functiongetBotById">
					<!-- -->
				</a>
				<div class="evenrow">

					<div>
						<span class="method-title">getBotById</span> (line <span
							class="line-number">24</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Returns a bot class by the given
						id</p>
					<ul class="tags">
						<li><span class="field">see:</span> <a
							href="../IRCBot_Handlers/Bots/IRCBot_Handlers_Bots.html#methodgetBotById">IRCBot_Handlers_Bots::getBotById()</a></li>
					</ul>

					<div class="method-signature">
						<span class="method-result"><a
							href="../default/IRCBot_Types_Bot.html">IRCBot_Types_Bot</a></span> <span
							class="method-name"> getBotById </span> ([<span class="var-type">int</span>&nbsp;<span
							class="var-name">$botId</span> = <span class="var-default">0</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">int</span> <span class="var-name">$botId</span><span
							class="var-description">: The bot id</span></li>
					</ul>


				</div>
				<a name="functionjoinChan" id="functionjoinChan">
					<!-- -->
				</a>
				<div class="oddrow">

					<div>
						<span class="method-title">joinChan</span> (line <span
							class="line-number">116</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Lets the bot join the specified
						channel</p>
					<ul class="tags">
						<li><span class="field">return:</span> the bot class if
							succeed else false</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">Returns</span> <span
							class="method-name"> joinChan </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$channel</span>, [<span class="var-type">int</span>&nbsp;<span
							class="var-name">$botId</span> = <span class="var-default">0</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$channel</span><span class="var-description">:
								The channel to join</span></li>
						<li><span class="var-type">int</span> <span class="var-name">$botId</span><span
							class="var-description">: The bot id of the bot that needs
								to join the channel</span></li>
					</ul>


				</div>
				<a name="functionmsg" id="functionmsg">
					<!-- -->
				</a>
				<div class="evenrow">

					<div>
						<span class="method-title">msg</span> (line <span
							class="line-number">86</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Send a PRIVMSG from the selected
						bot</p>
					<ul class="tags">
						<li><span class="field">return:</span> Returns the bot class
							if succeed else returns false</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">mixed</span> <span class="method-name">
							msg </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$target</span>, <span class="var-type">string</span>&nbsp;<span
							class="var-name">$message</span>, [<span class="var-type">int</span>&nbsp;<span
							class="var-name">$botId</span> = <span class="var-default">0</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$target</span><span class="var-description">:
								The target of the message</span></li>
						<li><span class="var-type">string</span> <span
							class="var-name">$message</span><span class="var-description">:
								The actual message to send</span></li>
						<li><span class="var-type">int</span> <span class="var-name">$botId</span><span
							class="var-description">: The bot id of the bot that needs
								to send the message</span></li>
					</ul>


				</div>
				<a name="functionnick" id="functionnick">
					<!-- -->
				</a>
				<div class="oddrow">

					<div>
						<span class="method-title">nick</span> (line <span
							class="line-number">46</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Returns the nickname of the user
						who triggered the current event</p>
					<ul class="tags">
						<li><span class="field">return:</span> The nickname of a user</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">string</span> <span
							class="method-name"> nick </span> ()
					</div>



				</div>
				<a name="functionnotice" id="functionnotice">
					<!-- -->
				</a>
				<div class="evenrow">

					<div>
						<span class="method-title">notice</span> (line <span
							class="line-number">99</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Send a NOTICE from the selected
						bot</p>
					<ul class="tags">
						<li><span class="field">return:</span> Returns the bot class
							if succeed else returns false</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">mixed</span> <span class="method-name">
							notice </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$target</span>, <span class="var-type">string</span>&nbsp;<span
							class="var-name">$message</span>, [<span class="var-type">int</span>&nbsp;<span
							class="var-name">$botId</span> = <span class="var-default">0</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$target</span><span class="var-description">:
								The target of the message</span></li>
						<li><span class="var-type">string</span> <span
							class="var-name">$message</span><span class="var-description">:
								The actual message to send</span></li>
						<li><span class="var-type">int</span> <span class="var-name">$botId</span><span
							class="var-description">: The bot id of the bot that needs
								to send the message</span></li>
					</ul>


				</div>
				<a name="functionpartChan" id="functionpartChan">
					<!-- -->
				</a>
				<div class="oddrow">

					<div>
						<span class="method-title">partChan</span> (line <span
							class="line-number">134</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Lets the bot part the specified
						channel</p>
					<ul class="tags">
						<li><span class="field">return:</span> the bot class if
							succeed else false</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">Returns</span> <span
							class="method-name"> partChan </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$channel</span>, [<span class="var-type">string</span>&nbsp;<span
							class="var-name">$message</span> = <span class="var-default">null</span>],
						[<span class="var-type">int</span>&nbsp;<span class="var-name">$botId</span>
						= <span class="var-default">0</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$channel</span><span class="var-description">:
								The channel to join</span></li>
						<li><span class="var-type">string</span> <span
							class="var-name">$message</span><span class="var-description">:
								The message used when parting the channel</span></li>
						<li><span class="var-type">int</span> <span class="var-name">$botId</span><span
							class="var-description">: The bot id of the bot that needs
								to part the channel</span></li>
					</ul>


				</div>
				<a name="functionprivMsg" id="functionprivMsg">
					<!-- -->
				</a>
				<div class="evenrow">

					<div>
						<span class="method-title">privMsg</span> (line <span
							class="line-number">68</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Send a PRIVMSG from the selected
						bot</p>
					<ul class="tags">
						<li><span class="field">return:</span> Returns the bot class
							if succeed else returns false</li>
					</ul>

					<div class="method-signature">
						<span class="method-result">mixed</span> <span class="method-name">
							privMsg </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$target</span>, <span class="var-type">string</span>&nbsp;<span
							class="var-name">$message</span>, [<span class="var-type">int</span>&nbsp;<span
							class="var-name">$botId</span> = <span class="var-default">0</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$target</span><span class="var-description">:
								The target of the message</span></li>
						<li><span class="var-type">string</span> <span
							class="var-name">$message</span><span class="var-description">:
								The actual message to send</span></li>
						<li><span class="var-type">int</span> <span class="var-name">$botId</span><span
							class="var-description">: The bot id of the bot that needs
								to send the message</span></li>
					</ul>


				</div>
				<a name="functiontoken" id="functiontoken">
					<!-- -->
				</a>
				<div class="oddrow">

					<div>
						<span class="method-title">token</span> (line <span
							class="line-number">176</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Get a token from a tokenized
						string</p>

					<div class="method-signature">
						<span class="method-result">string</span> <span
							class="method-name"> token </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$token</span>)
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$token</span><span class="var-description">:
								The token to return</span></li>
					</ul>


				</div>
				<a name="functiontokenize" id="functiontokenize">
					<!-- -->
				</a>
				<div class="evenrow">

					<div>
						<span class="method-title">tokenize</span> (line <span
							class="line-number">165</span>)
					</div>

					<!-- ========== Info from phpDoc block ========= -->
					<p class="short-description">Tokenize a string to use with
						token</p>

					<div class="method-signature">
						<span class="method-result">void</span> <span class="method-name">
							tokenize </span> (<span class="var-type">string</span>&nbsp;<span
							class="var-name">$string</span>, [<span class="var-type">int</span>&nbsp;<span
							class="var-name">$chr</span> = <span class="var-default">32</span>])
					</div>

					<ul class="parameters">
						<li><span class="var-type">string</span> <span
							class="var-name">$string</span><span class="var-description">:
								The string to tokenize</span></li>
						<li><span class="var-type">int</span> <span class="var-name">$chr</span><span
							class="var-description">: The ASCII character code to use
								when tokenizing</span></li>
					</ul>


				</div>
			</div>
		</div>

		<p class="notes" id="credit">
			Documentation generated on Wed, 04 Jan 2012 16:59:21 +0100 by <a
				href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
		</p>
	</div>
</body>
</html>